<?php
/**
 * Created by PhpStorm.
 * User: Jason
 * Date: 2017/8/5
 * Time: 19:06
 */

namespace Api\Service;


class SheetPurchaseService
{
    /**
     * 验证是否购买曲谱
     */
    public function verifySheetPurchase($param)
    {
        $sheetId = $param['sheet_id'];
        $uid = $param['uid'];
        $map = array(
            'sheet_id' => $sheetId,
            'user_id' => $uid
        );

        $res = M('SheetPurchase')->where($map)->select();
        if ($res) {
            return true;
        } else {
            return false;
        }
    }
}